package com.ccsc.auth.cas.service;

import org.jasig.cas.authentication.handler.PasswordEncoder;
import org.springframework.security.authentication.encoding.Md5PasswordEncoder;
import org.springframework.stereotype.Service;

@Service
public final class MyPasswordEncoder implements PasswordEncoder {

	@Override
	public String encode(String pwd) {
		Md5PasswordEncoder encoder = new Md5PasswordEncoder();  
        //encoder.setEncodeHashAsBase64(true);
        return encoder.encodePassword(pwd, null);
	}
}
